#include <iostream>
#include <cstdlib>

using namespace std;

int main() {

    int num = 4;
    char res[100];
    _itoa(num, res, 3);
    cout << res << endl;

    string str = "100";
    char *error;
    auto ans = strtol(str.c_str(), &error, 2);
    cout << ans;
    return 0;
}